﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dynamic>" %>
<%@ Import Namespace="Telerik.Web.Mvc" %>
<div style="background-color: #1a1a1a; position: fixed; top: 0; left: 0; width: 220px;
   height: 100%;overflow-y:auto;overflow-x:hidden;">
    <div id="logo" style="height: 80px; width: 90%; padding: 5px; top: 0">
        <h1 style="color: #b6b6b6;">
            <img src="../../Content/logo.png" /></h1>
        <h2 style="color: #535353; text-align: right">
            </h2>
    </div>
    <div id="product-lines" style="height:50px;">
        <% Html.RenderPartial("LogOnUserControl"); %>
    </div>    

    <div id="menucontainer" style="height: 40px;line-height:20px; width: 90%; padding-left: 10px; padding-right: 10px;">
        <div style="color: #bebebe;font-size:15px;font-weight:bold;">
            <%:Html.ActionLink("活动列表","Index","Home") %></div>
            <%if (Request.IsAuthenticated)
              { %>
        <div style="color: #808080;font-size:15px;font-weight:bold;">
             <%:Html.ActionLink("我的投票", "MyActivity", "Home")%></div>
            <%} %>
    </div>
    <%if (ViewContext.RouteData.Values["action"].ToString() != "Message")
      {%>
    <div id="projectInfo" style="width: 90%; min-height: 200px; padding: 5px; display: none;
        padding-left: 10px; padding-right: 10px;">
    </div>
    <div id="messages" style="width: 90%; padding: 5px; padding-left: 10px; padding-right: 10px;
        min-height: 250px;">
        <%
         if (ViewContext.RouteData.Values["ID"] != null)
         {
             string activityid = ViewContext.RouteData.Values["ID"].ToString();
        %>
        <% Html.RenderPartial("AddMessage", new Message() { Activity_ID = activityid }); %>
        <% Html.RenderPartial("MessageScrollControl", activityid); %>
        <%}
         else
         { %>
        <% Html.RenderPartial("MessageScrollControl", ""); %>
        <%} %>
    </div>
    <%} %>
</div>
